/*
* // +-------------------------------------------------------------------------------------------------
* // |                 有你就好 [ 有节骨乃坚，无心品自端 ]     <http://encoding.wang>
* // +-------------------------------------------------------------------------------------------------
* // |                             独在异乡为异客         每逢佳节倍思亲
* // +-------------------------------------------------------------------------------------------------
* // |                 联系:   <707069100@qq.com>      <http://weibo.com/513778937>
* // +-------------------------------------------------------------------------------------------------
*/

// -----------------------------------------------------------------------------------------------------
// +----------------------------------------------------------------------------------------------------
// |                   ErYang出品 属于小极品          共同学习    共同进步
// +----------------------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------------------


package wang.encoding.mroot.admin.common.freemarker.modelex

import freemarker.template.TemplateMethodModelEx
import freemarker.template.TemplateModelException
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Component
import wang.encoding.mroot.common.config.LocaleMessageSourceConfiguration


/**
 * i18n 国际化 freemarker 方法类
 *
 * @author ErYang
 */
@Component
class I18nMethodModelEx
@Autowired constructor(private var localeMessageSourceConfiguration: LocaleMessageSourceConfiguration)
    : TemplateMethodModelEx {


    @Throws(TemplateModelException::class)
    override fun exec(list: List<*>): Any {
        return localeMessageSourceConfiguration.getMessage(list[0].toString())
    }

    // -------------------------------------------------------------------------------------------------

}

// -----------------------------------------------------------------------------------------------------

// End I18nMethodModelEx class

/* End of file I18nMethodModelEx.kt */
/* Location: ./src/main/kotlin/wang/encoding/mroot/admin/common/freemarker/modelex/I18nMethodModelEx.kt */

// -----------------------------------------------------------------------------------------------------
// +----------------------------------------------------------------------------------------------------
// |                           ErYang出品 属于小极品  O(∩_∩)O~~   共同学习    共同进步
// +----------------------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------------------
